using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;

namespace Mvvm.ViewModels;

public class MainPageViewModel : ObservableObject {
    private Models.Contact _contact;

    public Models.Contact Contact {
        get => _contact;
        set => SetProperty(ref _contact, value);
    }

    private RelayCommand _readCommand;

    public RelayCommand ReadCommand =>
        _readCommand ??= new RelayCommand(() => Contact = new Models.Contact {
            Id = 1, Name = "Yasmine", PhoneNumber = "+8613800138000"
        });
}